home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / doc / files / libq.doc < prev    next >
Encoding:
Text File  |  1992-11-19  |  4.6 KB  |  118 lines

  1.  
  2.  
  3.  
  4.  
  5.      LIBQ(FILES)                                           LIBQ(FILES)
  6.  
  7.  
  8.  
  9.      NAME
  10.           libq - Equel run-time support library
  11.  
  12.      DESCRIPTION
  13.           _L_i_b_q all the routines necessary  for  an  equel  program  to
  14.           load.   It typically resides in /_u_s_r/_l_i_b/_l_i_b_q._a, and must be
  15.           specified when loading equel pre-processed object code.   It
  16.           may be referenced on the command line of _c_c by the abbrevia-
  17.           tion -_l_q.
  18.  
  19.           Several useful routines which are used  by  equel  processes
  20.           are  included  in the library.  These may be employed by the
  21.           equel programmer to avoid code duplication.  They are:
  22.  
  23.           int     IIatoi(buf, i)
  24.           char    *buf;
  25.           int     i;
  26.  
  27.           char    *IIbmove(source, destination, len)
  28.           char    *source, *destination;
  29.           int     len;
  30.  
  31.           char    *IIconcatv(buf, arg1, arg2, ..., 0)
  32.           char    *buf, *arg1, ...;
  33.  
  34.           char    *IIitos(i)
  35.           int     i;
  36.  
  37.           int     IIsequal(s1, s2)
  38.           char    *s1, *s2;
  39.  
  40.           int     IIlength(string)
  41.           char    *string;
  42.  
  43.           IIsyserr(string, arg1, arg2, ...);
  44.           char    *string;
  45.  
  46.  
  47.           IIatoi      IIatoi is equivalent to atoi(UTIL).
  48.  
  49.           IIbmove     Moves _l_e_n bytes from _s_o_u_r_c_e to _d_e_s_t_i_n_a_t_i_o_n,  re-
  50.                       turning a pointer to the location after the last
  51.                       byte moved.  Does not append a null byte.
  52.  
  53.           IIconcatv   Concatenates into _b_u_f all of its arguments,  re-
  54.                       turning a pointer to the null byte at the end of
  55.                       the concatenation.  _B_u_f may not be equal to  any
  56.                       of the arg-n but arg1.
  57.  
  58.           IIitos      IIitos is equivalent to itoa(III).
  59.  
  60.           IIsequal    Returns 1 iff strings s1 is identical to s2.
  61.  
  62.           IIlength    Returns max(length of _s_t_r_i_n_g without  null  byte
  63.                       at end, 255)
  64.  
  65.           IIsyserr    IIsyserr is diferrent from syserr(util) only  in
  66.                       that  it will print the name in IIproc_name, and
  67.                       in that there is no 0 mode.  Also, it  will  al-
  68.                       ways call exit(-1) after printing the error mes-
  69.                       sage.
  70.  
  71.           There are also some global  Equel  variables  which  may  be
  72.           manipulated by the user:
  73.  
  74.           int         IIerrflag;
  75.           char        *IImainpr;
  76.           char        (*IIprint_err)();
  77.           int         IIret_err();
  78.           int         IIno_err();
  79.  
  80.  
  81.           IIerrflag   Set on an error from  INGRES  to  be  the  error
  82.                       number  (see  the  error  message section of the
  83.                       ``INGRES Reference Manual'') that ocurred.  This
  84.                       remains valid from the time the error occurrs to
  85.                       the time when the next equel  statement  is  is-
  86.                       sued.   This  may  be  used  just after an equel
  87.                       statement to see if it succeded.
  88.  
  89.           IImainpr    This is a string which determines  which  ingres
  90.                       to  call when a "## ingres" is issued. Initially
  91.                       it is "/usr/bin/ingres".
  92.  
  93.           IIprint_err This function pointer is used to call a function
  94.                       which  determines  what  (if  any) error message
  95.                       should be printed when an ingres  error  occurs.
  96.                       It  is  called  from  IIerror()  with  the error
  97.                       number as an argument,  and  the  error  message
  98.                       corresponding  to the error number returned will
  99.                       be printed.  If (*IIprint_err)(<_e_r_r_n_o>)  returns
  100.                       0,  then no error message will be printed.  Ini-
  101.                       tially IIprint_err  is  set  to  IIret_err()  to
  102.                       print the error that ocurred.
  103.  
  104.           IIret_err   Returns its single  integer  argument.  Used  to
  105.                       have  (*IIprint_err)() cause printing of the er-
  106.                       ror that ocurred.
  107.  
  108.           IIno_err    Returns  0.  Used   to   have   (*IIprint_err)()
  109.                       suppress  error  message  printing.  IIno_err is
  110.                       used when an error in a parametrized equel  sta-
  111.                       temenr   occurs  to  suppress  printing  of  the
  112.                       corresponding parser error.
  113.  
  114.      SEE ALSO
  115.           atoi(util),  bmove(util),  cc(1),   equel(unix),   exit(2),
  116.           itoa(3), length(util), sequal(util), syserr(util)
  117.  
  118.